package com.wwtech.epp.view.dynamicapp;

import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.LinearLayout;
import android.widget.TextView;

import com.wwtech.epp.R;
import com.wwtech.epp.entity.DynamicUI;

/**
 * Created by hu on 2017/9/18.
 * 日期
 */

public class DatepickerAppView extends LinearLayout{

    private TextView title;
    private TextView content;
    private DynamicUI.DataBean dataBean;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    private String key;

    public DynamicUI.DataBean getDataBean() {
        return dataBean;
    }

    public void setDataBean(DynamicUI.DataBean dataBean) {
        this.dataBean = dataBean;
        initContent();
    }

    public TextView getTitle() {
        return title;
    }

    public void setTitle(TextView title) {
        this.title = title;
    }

    public TextView getContent() {
        return content;
    }

    public void setContent(TextView content) {
        this.content = content;
    }

    public DatepickerAppView(Context context) {
        super(context);
        init(context);
    }

    private void init(Context context) {
        View view = LayoutInflater.from(context).inflate(R.layout.appview_datepicker, this, true);
        title = (TextView) view.findViewById(R.id.title);
        content = (TextView) view.findViewById(R.id.content);
    }

    private void initContent() {
        title.setText(dataBean.getTitle());
    }

}
